<?php
namespace app\common\validate;

use think\Validate;

class ProductCatValidate extends Validate{

    protected $rule = [
        'name'=>'require',    //名称可以相同 因为有分组
        'catway'=>'require',
    ];

    protected $message = [
        'name.require'=>'名称必填',
        'catway.require'=>'分类方法标志必填',
    ];

    protected $scene = [
        'add' => ['name','catway'],
        'edit' => ['name','catway'],
    ];
}